package com.jl.core.mapper;

import com.jl.model.Coalition;
import com.jl.model.CoalitionRoom;
import com.jl.model.vo.CoalitionVo;
import com.jl.utils.MyMapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface CoalitionMapper extends MyMapper<Coalition> {

    @Select("select t1.id,t1.`name`,t2.nick_name createUser,t3.`name` role from coalition t1 left join user t2 on t1.create_user=t2.id left join dictionary t3 on t2.user_role=t3.`value` and t3.code='user_role'")
    List<CoalitionVo> selectCoalitionList();

    @Select("select id,game_type gameType from coalition_room where status='0'")
    List<CoalitionRoom> selectDeleteRoom();

}
